package czopyk.model.request;

import java.util.HashSet;
import java.util.Set;

public class CompositeRequest extends Request {

	public CompositeRequest(LoadClass lc) {
		super(lc);
	}

	protected Set<Request> components;
	
	public Set<Request> getComponents() {
		if (components == null) {
			components = new HashSet<Request>();
		}
		return components;
	}

	@Override
	public void done(String centerName) {
		super.done(centerName);
		for (Request r : getComponents()) {
			r.done(centerName);
		}
	}
	
}
